<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/jsp/taglibs.jsp" %>
<script>
  function submitByPage(url){
	  var pageSize = $(".selectPageSize").val();
	  loadMainHtml(url + "&pageSize=" + pageSize);
  }
</script>
<div class="flip">
    <c:choose>
       <c:when test="${pageList.hasFirst }">
          <a href="javascript:void(0);"  onclick="loadMainHtml('${param.actionName }&currentPage=1&id=${param.id}&pageSize=${pageList.pageSize }');">首页</a>
       </c:when>
       <c:otherwise></c:otherwise>
    </c:choose>
    
    <c:choose>
       <c:when test="${pageList.hasPrevious }">
          <a href="javascript:void(0);"  onclick="loadMainHtml('${param.actionName }&currentPage=${pageList.currentPage-1 }&id=${param.id}&pageSize=${pageList.pageSize }');">上一页</a>
       </c:when>
       <c:otherwise></c:otherwise>
    </c:choose>
    
    <c:choose>
       <c:when test="${pageList.hasNext }">
          <a href="javascript:void(0);"  onclick="loadMainHtml('${param.actionName }&currentPage=${pageList.currentPage+1 }&id=${param.id}&pageSize=${pageList.pageSize }');">下一页</a>
       </c:when>
       <c:otherwise></c:otherwise>
    </c:choose>
    
    <c:choose>
       <c:when test="${pageList.hasLast }">
          <a href="javascript:void(0);"  onclick="loadMainHtml('${param.actionName }&currentPage=${pageList.totalPage }&id=${param.id}&pageSize=${pageList.pageSize }');">尾页</a>
       </c:when>
       <c:otherwise></c:otherwise>
    </c:choose>
    
    <select class="selectPageSize"  style="margin-left:3px;float:left;" name="pageSize" onchange="submitByPage('${param.actionName }&id=${param.id}&currentPage=${pageList.currentPage }')">
       <option value="10"  <c:if test="${pageList.pageSize==10 }"> selected="selected"</c:if> >10</option>
       <option value="15"  <c:if test="${pageList.pageSize==15 }"> selected="selected"</c:if> >15</option>
       <option value="20"  <c:if test="${pageList.pageSize==20 }"> selected="selected"</c:if> >20</option>
       <option value="50"  <c:if test="${pageList.pageSize==50 }"> selected="selected"</c:if> >50</option>
       <option value="100"  <c:if test="${pageList.pageSize==100 }"> selected="selected"</c:if> >100</option>
    </select>
</div>
